/*
 * StaffAction.java
 *
 * Created on 10 de diciembre de 2005, 17:19
 *
 * To change this template, choose Tools | Template Manager
 * and open the template in the editor.
 */
package org.fiel.struts.actions;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import org.apache.struts.action.ActionForm;
import org.apache.struts.action.ActionForward;
import org.apache.struts.action.ActionMapping;
import org.apache.struts.actions.DispatchAction;

import org.fiel.FielConstants;
import org.fiel.admin.dao.AreaDAO;
import org.fiel.admin.dao.CargoDAO;

/**
 * @author Luis Pablo Gallo (luispablo.gallo@gmail.com)
 */
public class StaffAction extends DispatchAction{
    
    public ActionForward view   ( ActionMapping mapping
                                , ActionForm form
                                , HttpServletRequest request
                                , HttpServletResponse response )
    throws Exception{
        AreaDAO dao = new AreaDAO();
        CargoDAO cargos = new CargoDAO();
        
        request.setAttribute(FielConstants.AREAS, dao.retrieveUsed());
        request.setAttribute(FielConstants.CARGOS_SIN_AREA, cargos.retrieveSinArea());
        
        return mapping.findForward(FielConstants.SHOW_LIST);
    }
    
}
